//
//  CaoZuoDanMainModel.h
//  LogisticsSupplier
//
//  Created by 吕晶 on 2020/9/25.
//  Copyright © 2020 吕晶. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CaoZuoDanDiaoDuModel;
@class CaoZuoDanYunDanModel;
@class CaoZuoDanDiaoDuAddressModel;

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger,CaoZuoDanStatus) {
    CaoZuoDanStatusNew       =   1,//新建
    CaoZuoDanStatusSure           ,//确认
    CaoZuoDanStatusBoHui          ,//驳回
    CaoZuoDanStatusJiaoHuoChuFa   ,//交货出发
    CaoZuoDanStatusJiaoHuoDaoDa   ,//交货到达
    CaoZuoDanStatusGanXianQianShou,//干线签收
    CaoZuoDanStatusGanXianChuFa   ,//干线出发
    CaoZuoDanStatusGanXianTuZhong ,//干线途中
    CaoZuoDanStatusGanXianDaoDa   ,//干线到达
    CaoZuoDanStatusPaiSongQianShou,//派送签收
    CaoZuoDanStatusYunDanQianShou ,//运单签收
    CaoZuoDanStatusHuiDanFanHui   ,//回单返回
    CaoZuoDanStatusFinish         ,//完成
    CaoZuoDanStatusZuoFei          //作废
};

typedef NS_ENUM(NSInteger,CaoZuoDanOperationStatus) {
    CaoZuoDanOperationStatusNoSure   = 1,//未确认
    CaoZuoDanOperationStatusSure        ,//确认
    CaoZuoDanOperationStatusBoHui        //驳回
};

typedef NS_ENUM(NSInteger,CaoZuoDanSupplierType) {
    CaoZuoDanSupplierTypeTiHuo   =  1,//提货供应商
    CaoZuoDanSupplierTypeGanXian     ,//干线供应商
    CaoZuoDanSupplierTypePaiSong     ,//派送供应商
    CaoZuoDanSupplierTypeJiaoHuo     ,//交货供应商
    CaoZuoDanSupplierTypeOther        //其他供应商
};

typedef NS_ENUM(NSInteger,CaoZuoDanSignType) {
    CaoZuoDanSignTypeNoShow    =  1,//不显示
    CaoZuoDanSignTypeShow          ,//显示
    CaoZuoDanSignTypeZhiHui         //置灰
};

@interface CaoZuoDanMainModel : NSObject

@property (nonatomic, copy) NSString *o_id;//操作单ID
@property (nonatomic, copy) NSString *operating_num;//操作单号
@property (nonatomic, assign) CaoZuoDanStatus status;//操作单状态
@property (nonatomic, assign) CaoZuoDanOperationStatus supplier_status;//供应商操作操作单状态：1未确认 2确认 3驳回
@property (nonatomic, copy) NSString *tlogistics_name;//托运方
@property (nonatomic, copy) NSString *tlogistics_mobile;//托运方（3pl）联系方式
@property (nonatomic, copy) NSString *origin;//出发地
@property (nonatomic, copy) NSString *destination;//目的地

@property (nonatomic, assign) CaoZuoDanSupplierType type;//供应商类型：1提货供应商 2干线 3派送 4交货 5其他
@property (nonatomic, copy) NSString *price;//参考价格
@property (nonatomic, copy) NSString *constract_sn;//合同编号
@property (nonatomic, strong) NSArray <CaoZuoDanDiaoDuModel *>*delivery_list;//提货单列表
@property (nonatomic, strong) NSArray <CaoZuoDanYunDanModel *>*wallbill_list;//运单列表

@property (nonatomic, assign) CaoZuoDanSignType sign_button;//签收按钮显示：1不显示 2显示 3置灰

@property (nonatomic, copy) NSString *reject_time;//驳回时间
@property (nonatomic, copy) NSString *reject;//驳回原因
@property (nonatomic, copy) NSString *create_time;//创建时间
@property (nonatomic, copy) NSString *confirm_time;//确认时间
@property (nonatomic, copy) NSString *deliver_start_time;//交货出发时间
@property (nonatomic, copy) NSString *deliver_arrive_time;//交货到达时间
@property (nonatomic, copy) NSString *trunkline_sign_time;//干线签收时间
@property (nonatomic, copy) NSString *trunkline_start_time;//发运时间/干线出发时间(时间线中使用)
@property (nonatomic, copy) NSString *trunkline_to_time;//干线途中时间
@property (nonatomic, copy) NSString *trunkline_arrive_time;//干线到达时间
@property (nonatomic, copy) NSString *send_start_time;//派送签收时间
@property (nonatomic, copy) NSString *waybill_time;//运单签收时间
@property (nonatomic, copy) NSString *receipt_return_time;//回单签收时间
@property (nonatomic, copy) NSString *finish_time;//完成时间

@end

@interface CaoZuoDanDiaoDuModel : NSObject

@property (nonatomic, copy) NSString *dp_id;//调度ID
@property (nonatomic, copy) NSString *dp_num;//调度编号
@property (nonatomic, strong) CaoZuoDanDiaoDuAddressModel *origin;//提货地址
@property (nonatomic, strong) CaoZuoDanDiaoDuAddressModel *destination;//卸货地址

@end

@interface CaoZuoDanYunDanModel : NSObject

@property (nonatomic, copy) NSString *wa_id;//运单ID
@property (nonatomic, copy) NSString *wa_num;//运单编号
@property (nonatomic, strong) NSArray <CaoZuoDanDiaoDuAddressModel *>*origin;//提货地址
@property (nonatomic, strong) CaoZuoDanDiaoDuAddressModel *destination;//卸货地址

@end

@interface CaoZuoDanDiaoDuAddressModel : NSObject

@property (nonatomic, copy) NSString *name;//仓库名称
@property (nonatomic, copy) NSString *contract_name;//联系人
@property (nonatomic, copy) NSString *contract_tel;//联系方式
@property (nonatomic, copy) NSString *info;//地址详情

@end

NS_ASSUME_NONNULL_END
